import { useState } from "react";
const Fn = () => <div>12321</div>
const Fn2 = () => <div>fn222</div>
const Fn3 = () => <div>fn333</div>
function App() {
  const [count, setCount] = useState(0);
  const [name, setName] = useState('tom')
  return (
    <div>
      <h1>{count}</h1>
      <br />
      <h1>{name}</h1>
      <br />
      <button onClick={() => setCount(count + 1)}>+1</button>
      <button onClick={() => setName(name + Math.random())}>更改名字</button>
      <Fn />
      <Fn2 />
      <Fn3 />
    </div>
  );
}

export default App;
